home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #3
/
Amiga Plus CD - 2002 - No. 03.iso
/
AmiSoft
/
Game
/
Misc
/
Skeleton.lha
/
Skeleton
/
files
/
skeleton.lst
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
File List
|
2002-10-24
|
59.3 KB
|
1,508 lines
------- FILE skeleton.asm LEVEL 1 PASS 2
1 1ffe PROCESSOR 6502
------- FILE VCS.H LEVEL 2 PASS 2
0 ???? INCLUDE "VCS.H"
1 ????
2 ???? ; globals
3 ???? ; Atari 2600 Equates
4 ????
5 ???? 00 00 VSYNC equ $00 ; 0000 00x0 Vertical Sync Set-Clear
6 ???? 00 01 VBLANK equ $01 ; xx00 00x0 Vertical Blank Set-Clear
7 ???? 00 02 WSYNC equ $02 ; ---- ---- Wait for Horizontal Blank
8 ???? 00 03 RSYNC equ $03 ; ---- ---- Reset Horizontal Sync Counter
9 ???? 00 04 NUSIZ0 equ $04 ; 00xx 0xxx Number-Size player/missle 0
10 ???? 00 05 NUSIZ1 equ $05 ; 00xx 0xxx Number-Size player/missle 1
11 ???? 00 06 COLUP0 equ $06 ; xxxx xxx0 Color-Luminance Player 0
12 ???? 00 07 COLUP1 equ $07 ; xxxx xxx0 Color-Luminance Player 1
13 ???? 00 08 COLUPF equ $08 ; xxxx xxx0 Color-Luminance Playfield
14 ???? 00 09 COLUBK equ $09 ; xxxx xxx0 Color-Luminance Background
15 ???? 00 0a CTRLPF equ $0A ; 00xx 0xxx Control Playfield, Ball, Collisions
16 ???? 00 0b REFP0 equ $0B ; 0000 x000 Reflection Player 0
17 ???? 00 0c REFP1 equ $0C ; 0000 x000 Reflection Player 1
18 ???? 00 0d PF0 equ $0D ; xxxx 0000 Playfield Register Byte 0
19 ???? 00 0e PF1 equ $0E ; xxxx xxxx Playfield Register Byte 1
20 ???? 00 0f PF2 equ $0F ; xxxx xxxx Playfield Register Byte 2
21 ???? 00 10 RESP0 equ $10 ; ---- ---- Reset Player 0
22 ???? 00 11 RESP1 equ $11 ; ---- ---- Reset Player 1
23 ???? 00 12 RESM0 equ $12 ; ---- ---- Reset Missle 0
24 ???? 00 13 RESM1 equ $13 ; ---- ---- Reset Missle 1
25 ???? 00 14 RESBL equ $14 ; ---- ---- Reset Ball
26 ???? 00 15 AUDC0 equ $15 ; 0000 xxxx Audio Control 0
27 ???? 00 16 AUDC1 equ $16 ; 0000 xxxx Audio Control 1
28 ???? 00 17 AUDF0 equ $17 ; 000x xxxx Audio Frequency 0
29 ???? 00 18 AUDF1 equ $18 ; 000x xxxx Audio Frequency 1
30 ???? 00 19 AUDV0 equ $19 ; 0000 xxxx Audio Volume 0
31 ???? 00 1a AUDV1 equ $1A ; 0000 xxxx Audio Volume 1
32 ???? 00 1b GRP0 equ $1B ; xxxx xxxx Graphics Register Player 0
33 ???? 00 1c GRP1 equ $1C ; xxxx xxxx Graphics Register Player 1
34 ???? 00 1d ENAM0 equ $1D ; 0000 00x0 Graphics Enable Missle 0
35 ???? 00 1e ENAM1 equ $1E ; 0000 00x0 Graphics Enable Missle 1
36 ???? 00 1f ENABL equ $1F ; 0000 00x0 Graphics Enable Ball
37 ???? 00 20 HMP0 equ $20 ; xxxx 0000 Horizontal Motion Player 0
38 ???? 00 21 HMP1 equ $21 ; xxxx 0000 Horizontal Motion Player 1
39 ???? 00 22 HMM0 equ $22 ; xxxx 0000 Horizontal Motion Missle 0
40 ???? 00 23 HMM1 equ $23 ; xxxx 0000 Horizontal Motion Missle 1
41 ???? 00 24 HMBL equ $24 ; xxxx 0000 Horizontal Motion Ball
42 ???? 00 25 VDELP0 equ $25 ; 0000 000x Vertical Delay Player 0
43 ???? 00 26 VDELP1 equ $26 ; 0000 000x Vertical Delay Player 1
44 ???? 00 27 VDELBL equ $27 ; 0000 000x Vertical Delay Ball
45 ???? 00 28 RESMP0 equ $28 ; 0000 00x0 Reset Missle 0 to Player 0
46 ???? 00 29 RESMP1 equ $29 ; 0000 00x0 Reset Missle 1 to Player 1
47 ???? 00 2a HMOVE equ $2A ; ---- ---- Apply Horizontal Motion
48 ???? 00 2b HMCLR equ $2B ; ---- ---- Clear Horizontal Move Registers
49 ???? 00 2c CXCLR equ $2C ; ---- ---- Clear Collision Latches
50 ????
51 ???? ; Read Address Registers
52 ???? ; bit 7 bit 6
53 ???? 00 00 CXM0P equ $0 ; xx00 0000 Read Collision M0-P1 M0-P0
54 ???? 00 01 CXM1P equ $1 ; xx00 0000 M1-P0 M1-P1
55 ???? 00 02 CXP0FB equ $2 ; xx00 0000 P0-PF P0-BL
56 ???? 00 03 CXP1FB equ $3 ; xx00 0000 P1-PF P1-BL
57 ???? 00 04 CXM0FB equ $4 ; xx00 0000 M0-PF M0-BL
58 ???? 00 05 CXM1FB equ $5 ; xx00 0000 M1-PF M1-BL
59 ???? 00 06 CXBLPF equ $6 ; x000 0000 BL-PF -----
60 ???? 00 07 CXPPMM equ $7 ; xx00 0000 P0-P1 M0-M1
61 ???? 00 08 INPT0 equ $8 ; x000 0000 Read Pot Port 0
62 ???? 00 09 INPT1 equ $9 ; x000 0000 Read Pot Port 1
63 ???? 00 0a INPT2 equ $A ; x000 0000 Read Pot Port 2
64 ???? 00 0b INPT3 equ $B ; x000 0000 Read Pot Port 3
65 ???? 00 0c INPT4 equ $C ; x000 0000 Read Input (Trigger) 0
66 ???? 00 0d INPT5 equ $D ; x000 0000 Read Input (Trigger) 1
67 ????
68 ???? ; Atari 2600 RIOT Memory Map
69 ????
70 ???? ; RAM equ $80 ; 80-FF, also shadowed to $180-$1FF
71 ????
72 ???? 02 80 SWCHA equ $280 ; Port A data register for joysticks:
73 ???? ; Bits 4-7 for player 1. Bits 0-3 for player 2.
74 ???? 02 81 SWACNT equ $281 ; Port A data direction register (DDR)
75 ???? 02 82 SWCHB equ $282 ; Port B data (console switches)
76 ???? 02 83 SWBCNT equ $283 ; Port B DDR
77 ???? 02 84 INTIM equ $284 ; Timer output
78 ???? 02 94 TIM1T equ $294 ; set 1 clock interval
79 ???? 02 95 TIM8T equ $295 ; set 8 clock interval
80 ???? 02 96 TIM64T equ $296 ; set 64 clock interval
81 ???? 02 97 T1024T equ $297 ; set 1024 clock interval
82 ????
------- FILE skeleton.asm
3 ????
------- FILE SKELRAM.ASM LEVEL 2 PASS 2
0 ???? INCLUDE "SKELRAM.ASM"
1 U???? SEG.U RAM
2 U0080 ORG $80
3 U0080 00 00 MAZE0L DS 2
4 U0082 00 00 MAZE1L DS 2
5 U0084 00 00 MAZE2L DS 2
6 U0086 00 00 MAZE3L DS 2
7 U0088 00 00 MAZE0R DS 2
8 U008a 00 00 MAZE1R DS 2
9 U008c 00 00 MAZE2R DS 2
10 U008e 00 00 MAZE3R DS 2
11 U0090 00 00 SKEL0 DS 2
12 U0092 00 00 SKEL1 DS 2
13 U0094 00 SKELTOP DS 1
14 U0095 00 SKELBOT DS 1
15 U0096 00 BALLTOP DS 1
16 U0097 00 BALLBOT DS 1
17 U0098 00 WALL DS 1
18 U0099 00 SKELDIS DS 1
19 U009a 00 RANDOM DS 1
20 U009b 00 SOUNDEL DS 1
21 U009c 00 FIREDEL DS 1
22 U009d 00 THISFIR DS 1
23 U009e 00 LASTFIR DS 1
24 U009f 00 THISMOV DS 1
25 U00a0 00 LASTMOV DS 1
26 U00a1 00 SKELNXT DS 1
27 U00a2 00 SKELX DS 1
28 U00a3 00 SKELY DS 1
29 U00a4 00 SKELIFE DS 1
30 U00a5 00 SKELNUM DS 1
31 U00a5 00 a6 RAMLOAD EQU .
32 U00a6 00 SKELDEL DS 1
33 U00a7 00 SKELPER DS 1
34 U00a8 00 SKELSEC DS 1
35 U00a9 00 SKELMIN DS 1
36 U00aa 00 SKELHRS DS 1
37 U00ab 00 PLAYPOS DS 1
38 U00ac 00 PLAYDIR DS 1
39 U00ad 00 PLAYRIG DS 1
40 U00ae 00 SKELPOS DS 1
41 U00af 00 SKELDIR DS 1
42 U00b0 00 SKELRIG DS 1
43 U00b1 00 TESTBIT DS 1
44 U00b2 00 LVLMASK DS 1
45 U00b3 00 MAZECOL DS 1
46 U00b4
47 U00b4 00 a3 TITLEY EQU SKELY
48 U00b4 00 a2 TITLEX EQU SKELX
49 U00b4 00 99 TITLEND EQU SKELDIS
50 U00b4 00 94 TITLTOP EQU SKELTOP
51 U00b4 00 95 TITLBOT EQU SKELBOT
52 U00b4
53 U00fe ORG $FE
54 U00fe 00 00 STACK DS 2
------- FILE skeleton.asm
5 U0100
6 ???? SEG ROM
7 1000 ORG $1000
8 1000
9 1000 53 6b 65 6c* DC.B "Skeleton (c)2002 Eric Ball",0
10 101b
11 101b 85 02 KERN0 STA WSYNC ;56-0
12 101d b1 80 LDA (MAZE0L),Y ;-5
13 101f 85 0d STA PF0 ;-8
14 1021 c4 96 CPY BALLTOP ;-10
15 1023 90 06 BCC WAIT0 ;-12/13
16 1025 c4 97 CPY BALLBOT ;-14
17 1027 b0 02 BCS WAIT0 ;-16/17
18 1029 a9 02 LDA #2 ;-18
19 102b 85 1f WAIT0 STA ENABL ;-21
20 102d 86 0e STX PF1 ;-24
21 102f 86 0f STX PF2 ;-27
22 1031 b1 88 LDA (MAZE0R),Y ;-32
23 1033 85 0d STA PF0 ;-35
24 1035 c8 INY ;-37
25 1036 a5 98 LDA WALL ;-40
26 1038 c9 01 CMP #1 ;-42
27 103a f0 06 BEQ WALL15 ;-44/45
28 103c c0 14 CPY #20 ;-46
29 103e d0 db BNE KERN0 ;-48/49
30 1040 f0 1f BEQ KERN20 ;-51
31 1042 c0 0f WALL15 CPY #15 ;-47
32 1044 90 d5 BCC KERN0 ;-49/50
33 1046 a2 ff LDX #$FF ;-51
34 1048 c0 14 CPY #20 ;-53
35 104a d0 cf BNE KERN0 ;-55/56
36 104c
37 104c 85 02 WALL20 STA WSYNC ;44-0
38 104e a9 80 LDA #$80 ;-2
39 1050 85 0d STA PF0 ;-5
40 1052 a9 00 LDA #$00 ;-7
41 1054 85 0e STA PF1 ;-10
42 1056 85 0f STA PF2 ;-13
43 1058 a2 96 LDX #170-20 ;-15
44 105a 20 7c 16 JSR XWALL ;-21
45 105d ca DEX ;48-50
46 105e 4c c4 11 JMP KERN170 ;-53
47 1061
48 1061 85 02 KERN20 STA WSYNC ;72-0
49 1063 8a TXA ;-2
50 1064 29 0f AND #$0F ;-4
51 1066 11 82 ORA (MAZE1L),Y ;-9
52 1068 85 0e STA PF1 ;-12
53 106a 86 0f STX PF2 ;-15
54 106c a2 80 LDX #$80 ;-17
55 106e 86 0d STX PF0 ;-20
56 1070 a2 04 LDX #4 ;-22
57 1072 ca WAIT20 DEX ;+2
58 1073 d0 fd BNE WAIT20 ;+2/3
59 1075 29 0f AND #$0F ;41-43
60 1077 11 8a ORA (MAZE1R),Y ;-48
61 1079 85 0e STA PF1 ;-51
62 107b c8 INY ;-53
63 107c a5 98 LDA WALL ;-56
64 107e c9 02 CMP #2 ;-58
65 1080 f0 06 BEQ WALL35 ;-60/61
66 1082 c0 28 CPY #40 ;-62
67 1084 d0 db BNE KERN20 ;-64/65
68 1086 f0 1c BEQ KERN40 ;-67
69 1088 c0 23 WALL35 CPY #35 ;61-63
70 108a 90 d5 BCC KERN20 ;-65/66
71 108c ca DEX ;-67
72 108d c0 28 CPY #40 ;-69
73 108f d0 d0 BNE KERN20 ;-71/72
74 1091
75 1091 85 02 WALL40 STA WSYNC ;41-0
76 1093 a9 10 LDA #$10 ;-2
77 1095 85 0e STA PF1 ;-5
78 1097 a9 00 LDA #$00 ;-7
79 1099 85 0f STA PF2 ;-10
80 109b a2 6e LDX #150-40 ;-12
81 109d 20 7c 16 JSR XWALL ;-18
82 10a0 ca DEX ;48-50
83 10a1 4c 98 11 JMP KERN150 ;-53
84 10a4
85 10a4 85 02 KERN40 STA WSYNC ;72-0
86 10a6 b1 84 LDA (MAZE2L),Y ;-5
87 10a8 85 0e STA PF1 ;-8
88 10aa 86 0f STX PF2 ;-11
89 10ac a2 05 LDX #5 ;-13
90 10ae c4 94 CPY SKELTOP ;-15
91 10b0 90 0a BCC WAIT40 ;-17/18
92 10b2 b1 90 LDA (SKEL0),Y ;-22
93 10b4 85 1b STA GRP0 ;-24
94 10b6 b1 92 LDA (SKEL1),Y ;-29
95 10b8 85 1c STA GRP1 ;-32
96 10ba a2 02 LDX #2 ;-34
97 10bc ca WAIT40 DEX ;+2
98 10bd d0 fd BNE WAIT40 ;+2/3
99 10bf b1 8c LDA (MAZE2R),Y ;42/43-47/48
100 10c1 85 0e STA PF1 ;-50/51
101 10c3 c8 INY ;-53
102 10c4 a5 98 LDA WALL ;-56
103 10c6 c9 03 CMP #3 ;-58
104 10c8 f0 08 BEQ WALL55 ;-60/61
105 10ca c0 3c CPY #60 ;-62
106 10cc d0 d6 BNE KERN40 ;-64/65
107 10ce a9 00 LDA #$00 ;-66
108 10d0 f0 35 BEQ KERN60 ;-69
109 10d2 c0 37 WALL55 CPY #55 ;61-63
110 10d4 90 ce BCC KERN40 ;-65/66
111 10d6 ca DEX ;-67
112 10d7 c0 3c CPY #60 ;-69
113 10d9 d0 c9 BNE KERN40 ;-71/72
114 10db
115 10db 85 02 WALL60 STA WSYNC ;41-0
116 10dd a9 11 LDA #$11 ;-2
117 10df 85 0e STA PF1 ;-5
118 10e1 a9 00 LDA #$00 ;-7
119 10e3 85 0f STA PF2 ;-10
120 10e5 a2 46 LDX #130-60 ;-12
121 10e7 20 7c 16 JSR XWALL ;-18
122 10ea ca DEX ;48-50
123 10eb 4c 6c 11 JMP KERN130 ;-53
124 10ee
125 10ee ; 18
126 10ee e8 PVIEW1 INX ; center view subroutine
127 10ef 98 TYA ; move forward one step
128 10f0 18 CLC
129 10f1 65 ac ADC PLAYDIR
130 10f3 c5 ae CMP SKELPOS ; check skeleton position
131 10f5 d0 02 BNE PVIEW2
132 10f7 86 99 STX SKELDIS ; save if found
133 10f9 a8 PVIEW2 TAY ; check for wall
134 10fa a5 b2 LDA LVLMASK
135 10fc 39 00 18 AND MAZES,Y ; BNE done after return
136 10ff 60 RTS
137 1100
138 1100 a2 03 WAIT60 LDX #3 ;20-22
139 1102 ca WAIT61 DEX ;+2
140 1103 d0 fd BNE WAIT61 ;+2/3
141 1105 f0 1a BEQ KERN61 ;36-39
142 1107
143 1107 85 02 KERN60 STA WSYNC ;70-0
144 1109 29 f0 AND #$F0 ;-2
145 110b 11 86 ORA (MAZE3L),Y ;-7
146 110d 85 0f STA PF2 ;-10
147 110f a2 11 LDX #$11 ;-12
148 1111 86 0e STX PF1 ;-15
149 1113 c4 94 CPY SKELTOP ;-17
150 1115 90 e9 BCC WAIT60 ;-19/20
151 1117 aa TAX ;-21
152 1118 b1 90 LDA (SKEL0),Y ;-26
153 111a 85 1b STA GRP0 ;-29
154 111c b1 92 LDA (SKEL1),Y ;-34
155 111e 85 1c STA GRP1 ;-37
156 1120 8a TXA ;-39
157 1121 29 f0 KERN61 AND #$F0 ;39-41
158 1123 11 8e ORA (MAZE3R),Y ;-46
159 1125 85 0f STA PF2 ;-49
160 1127 c8 INY ;-51
161 1128 a5 98 LDA WALL ;-54
162 112a c9 04 CMP #4 ;-56
163 112c f0 06 BEQ WALL75 ;-58/59
164 112e c0 50 CPY #80 ;-60
165 1130 d0 d5 BNE KERN60 ;-62/63
166 1132 f0 0a BEQ KERN80 ;-65
167 1134 c0 4b WALL75 CPY #75 ;59-61
168 1136 90 cf BCC KERN60 ;-63/64
169 1138 a9 ff LDA #$FF ;-65
170 113a c0 50 CPY #80 ;-67
171 113c d0 c9 BNE KERN60 ;-69/70
172 113e
173 113e 85 02 KERN80 STA WSYNC ;36-0
174 1140 a9 08 LDA #$08 ;-2
175 1142 85 0f STA PF2 ;-5
176 1144 a2 1e LDX #110-80 ;-7
177 1146 20 7c 16 JSR XWALL ;-13
178 1149 ca DEX ;48-50
179 114a
180 114a 85 02 KERN110 STA WSYNC ;56-0
181 114c b1 86 LDA (MAZE3L),Y ;-5
182 114e 85 0f STA PF2 ;-8
183 1150 a2 04 LDX #4 ;-10
184 1152 c4 95 CPY SKELBOT ;-12
185 1154 b0 0a BCS WAIT110 ;-14/15
186 1156 b1 90 LDA (SKEL0),Y ;-19
187 1158 85 1b STA GRP0 ;-22
188 115a b1 92 LDA (SKEL1),Y ;-27
189 115c 85 1c STA GRP1 ;-30
190 115e a2 01 LDX #1 ;-32
191 1160 ca WAIT110 DEX ;+2
192 1161 10 fd BPL WAIT110 ;+2/3
193 1163 b1 8e LDA (MAZE3R),Y ;39/41-44/46
194 1165 85 0f STA PF2 ;-47/49
195 1167 c8 INY ;-51
196 1168 c0 82 CPY #130 ;-53
197 116a d0 de BNE KERN110 ;-55/56
198 116c
199 116c 85 02 KERN130 STA WSYNC ;64-0
200 116e b1 84 LDA (MAZE2L),Y ;-5
201 1170 85 0e STA PF1 ;-8
202 1172 86 0f STX PF2 ;-10
203 1174 a2 04 LDX #4 ;-12
204 1176 c4 95 CPY SKELBOT ;-14
205 1178 b0 0a BCS WAIT130 ;-16/17
206 117a b1 90 LDA (SKEL0),Y ;-21
207 117c 85 1b STA GRP0 ;-24
208 117e b1 92 LDA (SKEL1),Y ;-29
209 1180 85 1c STA GRP1 ;-32
210 1182 a2 01 LDX #1 ;-34
211 1184 ca WAIT130 DEX ;+2
212 1185 10 fd BPL WAIT130 ;+2/3
213 1187 b1 8c LDA (MAZE2R),Y ;41/43-46/48
214 1189 85 0e STA PF1 ;-49/51
215 118b c8 INY ;-53
216 118c c0 87 CPY #135 ;-55
217 118e 90 dc BCC KERN130 ;-57/58
218 1190 a2 00 LDX #$00 ;-59
219 1192 c0 96 CPY #150 ;-61
220 1194 d0 d6 BNE KERN130 ;-63/64
221 1196 a2 ff LDX #$FF ;-65
222 1198
223 1198 85 02 KERN150 STA WSYNC ;64-0
224 119a b1 82 LDA (MAZE1L),Y ;-5
225 119c 85 0e STA PF1 ;-8
226 119e 86 0f STX PF2 ;-10
227 11a0 a2 04 LDX #4 ;-12
228 11a2 c4 95 CPY SKELBOT ;-14
229 11a4 b0 0a BCS WAIT150 ;-16/17
230 11a6 b1 90 LDA (SKEL0),Y ;-21
231 11a8 85 1b STA GRP0 ;-24
232 11aa b1 92 LDA (SKEL1),Y ;-29
233 11ac 85 1c STA GRP1 ;-32
234 11ae a2 01 LDX #1 ;-34
235 11b0 ca WAIT150 DEX ;+2
236 11b1 10 fd BPL WAIT150 ;+2/3
237 11b3 b1 8a LDA (MAZE1R),Y ;41/43-46/48
238 11b5 85 0e STA PF1 ;-49/51
239 11b7 c8 INY ;-53
240 11b8 c0 9b CPY #155 ;-55
241 11ba 90 dc BCC KERN150 ;-57/58
242 11bc a2 00 LDX #$00 ;-59
243 11be c0 aa CPY #170 ;-61
244 11c0 d0 d6 BNE KERN150 ;-63/64
245 11c2 a2 ff LDX #$FF ;-65
246 11c4
247 11c4 85 02 KERN170 STA WSYNC ;48-0
248 11c6 b1 80 LDA (MAZE0L),Y ;-5
249 11c8 85 0d STA PF0 ;-8
250 11ca c4 96 CPY BALLTOP ;-10
251 11cc 90 06 BCC WAIT170 ;-12/13
252 11ce c4 97 CPY BALLBOT ;-14
253 11d0 b0 02 BCS WAIT170 ;-16/17
254 11d2 a9 02 LDA #2 ;-18
255 11d4 85 1f WAIT170 STA ENABL ;-21
256 11d6 86 0e STX PF1 ;-24
257 11d8 86 0f STX PF2 ;-27
258 11da b1 88 LDA (MAZE0R),Y ;-32
259 11dc 85 0d STA PF0 ;-35
260 11de c8 INY ;-37
261 11df c0 af CPY #175 ;-39
262 11e1 90 e1 BCC KERN170 ;-41/42
263 11e3 a2 00 LDX #$00 ;-43
264 11e5 c0 be CPY #190 ;-45
265 11e7 d0 db BNE KERN170 ;-47/48
266 11e9
267 11e9 a9 24 LAST LDA #30*76/64+1
268 11eb 85 02 STA WSYNC ;-0
269 11ed 8d 96 02 STA TIM64T ;-4
270 11f0 86 0d STX PF0
271 11f2
272 11f2 a6 9b LDX SOUNDEL ; sound countdown
273 11f4 f0 07 BEQ COLUPA ; already zero?
274 11f6 ca DEX
275 11f7 d0 04 BNE COLUPA ; zero?
276 11f9 86 19 STX AUDV0 ; turn off sound
277 11fb 86 1a STX AUDV1
278 11fd
279 11fd 86 9b COLUPA STX SOUNDEL
280 11ff a5 a4 LDA SKELIFE ; skeleton still alive?
281 1201 10 09 BPL COLUPB
282 1203 a6 9c LDX FIREDEL
283 1205 bd 00 1e LDA SKELDIE,X
284 1208 d0 11 BNE COLUPC
285 120a f0 0f BEQ COLUPC
286 120c a5 9c COLUPB LDA FIREDEL ; fire flash?
287 120e c9 37 CMP #55
288 1210 b0 0d BCS FIRETST
289 1212 a5 b3 LDA MAZECOL ; set playfield colour
290 1214 85 08 STA COLUPF
291 1216 a6 a4 LDX SKELIFE ; set skeleton color
292 1218 bd 00 1d LDA LIFELUM,X
293 121b 85 06 COLUPC STA COLUP0
294 121d 85 07 STA COLUP1
295 121f
296 121f a5 0c FIRETST LDA INPT4 ; fire button
297 1221 29 80 AND #$80
298 1223 c5 9d CMP THISFIR ; debounce
299 1225 d0 56 BNE PLAYMOV ; not the same
300 1227 a6 9e LDX LASTFIR ; check last button position
301 1229 85 9e STA LASTFIR ; save current
302 122b 10 50 BPL PLAYMOV ; do nothing if last was down
303 122d 0a ASL ; check current
304 122e b0 4d BCS PLAYMOV ; do nothing if up
305 1230 a5 9c LDA FIREDEL ; check reload delay
306 1232 d0 49 BNE PLAYMOV ; do nothing if reloading
307 1234 85 17 STA AUDF0 ; BANG!
308 1236 85 18 STA AUDF1
309 1238 a9 08 LDA #8
310 123a 85 15 STA AUDC0
311 123c 85 16 STA AUDC1
312 123e 85 19 STA AUDV0
313 1240 85 1a STA AUDV1
314 1242 85 9b STA SOUNDEL
315 1244 a5 99 LDA SKELDIS ; is skeleton in view?
316 1246 29 03 AND #$03
317 1248 f0 27 BEQ SETDEL ; not in view
318 124a a9 00 LDA #$00 ; make skeleton turn
319 124c 38 SEC ; and face plaer
320 124d e5 ac SBC PLAYDIR
321 124f 85 a1 STA SKELNXT
322 1251 a5 9a LDA RANDOM ; generate random damage
323 1253 29 0f AND #$0F ; 0-15
324 1255 85 9c STA FIREDEL ; save temp
325 1257 a5 a4 LDA SKELIFE ; reduce skeleton life
326 1259 38 SEC
327 125a e5 9c SBC FIREDEL
328 125c 85 a4 STA SKELIFE
329 125e a5 9c LDA FIREDEL ; set skeleton colour flash
330 1260 0a ASL
331 1261 0a ASL
332 1262 0a ASL
333 1263 0a ASL
334 1264 85 9c STA FIREDEL ; save msn
335 1266 a6 a4 LDX SKELIFE ; set luminance
336 1268 bd 00 1d LDA LIFELUM,X
337 126b 05 9c ORA FIREDEL ; combine
338 126d 85 06 STA COLUP0
339 126f 85 07 STA COLUP1
340 1271 a5 b3 SETDEL LDA MAZECOL ; set playfield colour
341 1273 29 0f AND #$0F ; flash maze too
342 1275 85 08 STA COLUPF
343 1277 a9 3c LDA #60 ; set reload timer = 1 sec
344 1279 85 9c STA FIREDEL
345 127b d0 00 BNE PLAYMOV
346 127d
347 127d ad 80 02 PLAYMOV LDA SWCHA ; PLAYER MOVE
348 1280 09 0f ORA #$0F
349 1282 c5 9f CMP THISMOV ; DEBOUNCE
350 1284 d0 4e BNE SKELMOV
351 1286 a6 a0 LDX LASTMOV ; moved last frame?
352 1288 e0 ff CPX #$FF
353 128a d0 1b BNE PMOVEA ; no
354 128c c9 ef CMP #$EF ; forward?
355 128e f0 2e BEQ PMOVEC
356 1290 c9 7f CMP #$7F ; turn right?
357 1292 f0 1b BEQ PMOVEB
358 1294 c9 bf CMP #$BF ; turn left?
359 1296 d0 3c BNE SKELMOV
360 1298 85 a0 STA LASTMOV
361 129a a6 ac LDX PLAYDIR ; turn left
362 129c a9 00 LDA #$00
363 129e 38 SEC
364 129f e5 ad SBC PLAYRIG
365 12a1 86 ad STX PLAYRIG
366 12a3 85 ac STA PLAYDIR
367 12a5 d0 2d BNE SKELMOV
368 12a7 c9 ff PMOVEA CMP #$FF ; return to center?
369 12a9 d0 29 BNE SKELMOV
370 12ab 85 a0 STA LASTMOV ; centered
371 12ad f0 25 BEQ SKELMOV
372 12af 85 a0 PMOVEB STA LASTMOV ; right turn
373 12b1 a6 ad LDX PLAYRIG
374 12b3 a9 00 LDA #$00
375 12b5 38 SEC
376 12b6 e5 ac SBC PLAYDIR
377 12b8 86 ac STX PLAYDIR
378 12ba 85 ad STA PLAYRIG
379 12bc d0 16 BNE SKELMOV
380 12be 85 a0 PMOVEC STA LASTMOV ; step forward
381 12c0 a5 98 LDA WALL
382 12c2 c9 01 CMP #1
383 12c4 f0 0e BEQ SKELMOV
384 12c6 a5 ab LDA PLAYPOS
385 12c8 18 CLC
386 12c9 65 ac ADC PLAYDIR
387 12cb 85 ab STA PLAYPOS
388 12cd c5 ae CMP SKELPOS
389 12cf d0 03 BNE SKELMOV
390 12d1 4c 6d 17 JMP GOTYOU
391 12d4
392 12d4 a5 a4 SKELMOV LDA SKELIFE ; skeleton still alive?
393 12d6 30 04 BMI SKELSTP
394 12d8 c6 a6 DEC SKELDEL ; main skeleton movement delay
395 12da f0 03 BEQ SKDEL1
396 12dc 4c 37 14 SKELSTP JMP BOTTOM ; no movement, skip everything
397 12df
398 12df a5 a8 SKDEL1 LDA SKELSEC ; decrease rate counter
399 12e1 38 SEC
400 12e2 e5 a7 SBC SKELPER
401 12e4 85 a8 STA SKELSEC
402 12e6 b0 20 BCS SKDEL2 ; no carry = underflow
403 12e8 69 3c ADC #60
404 12ea 85 a8 STA SKELSEC
405 12ec a5 a9 LDA SKELMIN
406 12ee 38 SEC
407 12ef e5 a7 SBC SKELPER ; decrease square counter
408 12f1 85 a9 STA SKELMIN
409 12f3 b0 13 BCS SKDEL2 ; no carry = underflow
410 12f5 69 57 ADC #87
411 12f7 85 a9 STA SKELMIN
412 12f9 a5 aa LDA SKELHRS
413 12fb 38 SEC
414 12fc e5 a7 SBC SKELPER ; decrease cube counter
415 12fe 85 aa STA SKELHRS
416 1300 b0 06 BCS SKDEL2 ; no carry = underflow
417 1302 69 57 ADC #87
418 1304 85 aa STA SKELHRS
419 1306 c6 a7 DEC SKELPER ; speed up skeleton!
420 1308 a5 a7 SKDEL2 LDA SKELPER
421 130a 85 a6 STA SKELDEL
422 130c
423 130c a5 a1 LDA SKELNXT ; forced move?
424 130e f0 2f BEQ SMOVEA ; nope, start the decision tree
425 1310 a2 00 LDX #0 ; clear forced move flag
426 1312 86 a1 STX SKELNXT
427 1314 c5 af CMP SKELDIR ; forced=facing?
428 1316 d0 03 BNE SKNXT0
429 1318 4c f9 13 JMP SMOVE1 ; step forward
430 131b 85 af SKNXT0 STA SKELDIR ; turn and set SKELRIG correctly
431 131d c9 01 CMP #1
432 131f f0 08 BEQ SKNXT1
433 1321 30 0c BMI SKNXT2
434 1323 a9 ff LDA #-1
435 1325 85 b0 STA SKELRIG
436 1327 d0 b3 BNE SKELSTP
437 1329 a9 10 SKNXT1 LDA #16
438 132b 85 b0 STA SKELRIG
439 132d d0 ad BNE SKELSTP
440 132f c9 ff SKNXT2 CMP #-1
441 1331 f0 06 BEQ SKNXT3
442 1333 a9 01 LDA #1
443 1335 85 b0 STA SKELRIG
444 1337 d0 a3 BNE SKELSTP
445 1339 a9 f0 SKNXT3 LDA #-16
446 133b 85 b0 STA SKELRIG
447 133d d0 9d BNE SKELSTP
448 133f a2 00 SMOVEA LDX #0 ; direction flags
449 1341 a5 ae LDA SKELPOS ; can we go forward?
450 1343 18 CLC
451 1344 65 af ADC SKELDIR
452 1346 a8 TAY
453 1347 a5 b2 LDA LVLMASK
454 1349 39 00 18 AND MAZES,Y
455 134c d0 2c BNE SMOVED ; can't go forward
456 134e e8 INX ; forward flag
457 134f a9 01 LDA #$01 ; determine facing
458 1351 24 af BIT SKELDIR ; use bit to test for neg too
459 1353 d0 0c BNE SMOVEB ; SKELDIR = +1/-1
460 1355 a5 ab LDA PLAYPOS ; check for player in same column
461 1357 38 SEC
462 1358 e5 ae SBC SKELPOS
463 135a 29 0f AND #$0F
464 135c d0 1c BNE SMOVED
465 135e 4c f9 13 JMP SMOVE1
466 1361 30 0c SMOVEB BMI SMOVEC ; SKELDIR = -1
467 1363 a5 ab LDA PLAYPOS
468 1365 38 SEC
469 1366 e5 ae SBC SKELPOS
470 1368 29 f0 AND #$F0 ; player ahead
471 136a d0 0e BNE SMOVED
472 136c 4c f9 13 JMP SMOVE1
473 136f a5 ae SMOVEC LDA SKELPOS ; player ahead (behind)
474 1371 38 SEC
475 1372 e5 ab SBC PLAYPOS
476 1374 29 f0 AND #$F0 ; player ahead
477 1376 d0 02 BNE SMOVED
478 1378 f0 7f BEQ SMOVE1
479 137a a5 ae SMOVED LDA SKELPOS ; can we go right?
480 137c 18 CLC
481 137d 65 b0 ADC SKELRIG
482 137f a8 TAY
483 1380 a5 b2 LDA LVLMASK
484 1382 39 00 18 AND MAZES,Y
485 1385 d0 02 BNE SMOVEE
486 1387 e8 INX
487 1388 e8 INX
488 1389 a5 ae SMOVEE LDA SKELPOS ; can we go left?
489 138b 38 SEC
490 138c e5 b0 SBC SKELRIG
491 138e a8 TAY
492 138f a5 b2 LDA LVLMASK
493 1391 39 00 18 AND MAZES,Y
494 1394 d0 04 BNE SMOVEF
495 1396 e8 INX
496 1397 e8 INX
497 1398 e8 INX
498 1399 e8 INX
499 139a e0 00 SMOVEF CPX #0
500 139c f0 18 BEQ SMOVE0 ; no directions, turn around
501 139e ca DEX
502 139f f0 58 BEQ SMOVE1 ; forward only
503 13a1 ca DEX
504 13a2 f0 23 BEQ SMOVE2 ; right only
505 13a4 ca DEX
506 13a5 f0 30 BEQ SMOVE3 ; right or forward
507 13a7 ca DEX
508 13a8 f0 33 BEQ SMOVE4 ; left only
509 13aa ca DEX
510 13ab f0 40 BEQ SMOVE5 ; left or forward
511 13ad ca DEX
512 13ae f0 43 BEQ SMOVE6 ; right or left
513 13b0 24 9a BIT RANDOM ; all directions
514 13b2 10 45 BPL SMOVE1
515 13b4 30 3d BMI SMOVE6
516 13b6 a9 00 SMOVE0 LDA #$00 ; turn around
517 13b8 38 SEC
518 13b9 e5 af SBC SKELDIR
519 13bb 85 af STA SKELDIR
520 13bd a9 00 LDA #$00
521 13bf 38 SEC
522 13c0 e5 b0 SBC SKELRIG
523 13c2 85 b0 STA SKELRIG
524 13c4 4c 37 14 JMP BOTTOM
525 13c7 a6 b0 SMOVE2 LDX SKELRIG ; turn right
526 13c9 a9 00 LDA #$00
527 13cb 38 SEC
528 13cc e5 af SBC SKELDIR
529 13ce 86 af STX SKELDIR
530 13d0 85 b0 STA SKELRIG
531 13d2 86 a1 STX SKELNXT ; force forward
532 13d4 4c 37 14 JMP BOTTOM
533 13d7 24 9a SMOVE3 BIT RANDOM
534 13d9 10 1e BPL SMOVE1
535 13db 30 ea BMI SMOVE2
536 13dd a6 af SMOVE4 LDX SKELDIR ; turn left
537 13df a9 00 LDA #$00
538 13e1 38 SEC
539 13e2 e5 b0 SBC SKELRIG
540 13e4 86 b0 STX SKELRIG
541 13e6 85 af STA SKELDIR
542 13e8 85 a1 STA SKELNXT ; force forward
543 13ea 4c 37 14 JMP BOTTOM
544 13ed 24 9a SMOVE5 BIT RANDOM
545 13ef 10 08 BPL SMOVE1
546 13f1 30 ea BMI SMOVE4
547 13f3 24 9a SMOVE6 BIT RANDOM
548 13f5 50 d0 BVC SMOVE2
549 13f7 70 e4 BVS SMOVE4
550 13f9 a5 ae SMOVE1 LDA SKELPOS ; step forward
551 13fb 18 CLC
552 13fc 65 af ADC SKELDIR
553 13fe 85 ae STA SKELPOS
554 1400 c5 ab CMP PLAYPOS
555 1402 d0 03 BNE SMOVE7
556 1404 4c 6d 17 JMP GOTYOU
557 1407 a5 9b SMOVE7 LDA SOUNDEL ; check for existing sound
558 1409 d0 2c BNE BOTTOM
559 140b 20 b7 16 JSR SKPOSXY ; calculate distance for sound
560 140e 20 b2 15 JSR PDIRXY
561 1411 20 91 16 JSR SKSTEP
562 1414 a9 01 LDA #1
563 1416 85 15 STA AUDC0
564 1418 85 16 STA AUDC1
565 141a a5 9a LDA RANDOM
566 141c 09 1e ORA #30
567 141e 85 17 STA AUDF0
568 1420 85 18 STA AUDF1
569 1422 e0 f1 CPX #-15
570 1424 10 02 BPL AUDX
571 1426 a2 f1 LDX #-15
572 1428 86 19 AUDX STX AUDV0 ; left speaker
573 142a c0 f1 CPY #-15
574 142c 10 02 BPL AUDY
575 142e a0 f1 LDY #-15
576 1430 84 1a AUDY STY AUDV1 ; right speaker
577 1432 a5 a6 LDA SKELDEL
578 1434 4a LSR
579 1435 85 9b STA SOUNDEL
580 1437
581 1437 20 39 16 BOTTOM JSR DOVSYNC
582 143a
583 143a a5 a4 NEWSKEL LDA SKELIFE ; skeleton dead?
584 143c 10 54 BPL PVIEW
585 143e a5 9c LDA FIREDEL ; done death flash?
586 1440 d0 50 BNE PVIEW
587 1442 a6 a5 LDX SKELNUM ; increment skeleton life
588 1444 e8 INX
589 1445 86 a5 STX SKELNUM
590 1447 86 a4 STX SKELIFE
591 1449 a6 b3 LDX MAZECOL ; increment maze luminance
592 144b e8 INX
593 144c 8a TXA
594 144d 29 0f AND #$0F
595 144f c9 0d CMP #13
596 1451 f0 28 BEQ NEXTLVL ; ten down, new level
597 1453 86 b3 STX MAZECOL
598 1455 a9 00 LDA #$00
599 1457 85 ae STA SKELPOS
600 1459 20 b7 16 JSR SKPOSXY ; figure out restart position
601 145c ; LDA SKELX
602 145c 10 05 BPL NEWSK1
603 145e 49 ff EOR #$FF ; NEG
604 1460 18 CLC
605 1461 69 01 ADC #$01
606 1463 24 a3 NEWSK1 BIT SKELY
607 1465 10 05 BPL NEWSK2
608 1467 38 SEC
609 1468 e5 a3 SBC SKELY
610 146a 10 03 BPL NEWSK3
611 146c 18 NEWSK2 CLC
612 146d 65 a3 ADC SKELY
613 146f c9 07 NEWSK3 CMP #$07
614 1471 10 04 BPL NEWSK4
615 1473 a9 78 LDA #120
616 1475 85 ae STA SKELPOS
617 1477 a2 05 NEWSK4 LDX #LOADDEL-LOADRAM ; reset skeleton move timers
618 1479 d0 0f BNE REINIT
619 147b 8a NEXTLVL TXA ; increment maze colour
620 147c 18 CLC
621 147d 69 16 ADC #$16
622 147f 85 b3 STA MAZECOL
623 1481 a2 0b LDX #LOADLVL-LOADRAM
624 1483 06 b2 ASL LVLMASK
625 1485 d0 03 BNE REINIT
626 1487 4c 73 17 JMP YOUWIN
627 148a
628 148a bd 2b 1c REINIT LDA LOADRAM-1,X ; refresh initial values
629 148d 95 a5 STA RAMLOAD-1,X
630 148f ca DEX
631 1490 d0 f8 BNE REINIT
632 1492
633 1492 a2 00 PVIEW LDX #0 ; center view & skeleton distance
634 1494 86 99 STX SKELDIS
635 1496 a4 ab LDY PLAYPOS
636 1498 20 ee 10 JSR PVIEW1
637 149b d0 10 BNE PVIEWA
638 149d 20 ee 10 JSR PVIEW1
639 14a0 d0 0b BNE PVIEWA
640 14a2 20 ee 10 JSR PVIEW1
641 14a5 d0 06 BNE PVIEWA
642 14a7 20 ee 10 JSR PVIEW1
643 14aa d0 01 BNE PVIEWA
644 14ac e8 INX
645 14ad 86 98 PVIEWA STX WALL ; save wall distance
646 14af a5 ab LDA PLAYPOS ; right view, step 1
647 14b1 18 CLC
648 14b2 65 ad ADC PLAYRIG
649 14b4 a2 8b LDX #MAZE1R+1 ; save bits here
650 14b6 20 89 17 PVIEWE JSR PVIEW3 ; test and save bits
651 14b9 e0 90 CPX #MAZE3R+2
652 14bb d0 f9 BNE PVIEWE
653 14bd a5 ab LDA PLAYPOS ; left view, step 1
654 14bf 38 SEC ;
655 14c0 e5 ad SBC PLAYRIG ;
656 14c2 a2 83 LDX #MAZE1L+1 ; save bits here
657 14c4 20 89 17 PVIEWF JSR PVIEW3 ;
658 14c7 e0 88 CPX #MAZE3L+2 ;
659 14c9 d0 f9 BNE PVIEWF ;
660 14cb a2 8b LDX #MAZE1R+1 ; right view, step 2
661 14cd a0 88 LDY #MAZE0R ;
662 14cf 20 e0 15 PVIEWG JSR PVIEW4 ; change bits to pointers
663 14d2 c0 90 CPY #MAZE3R+2 ;
664 14d4 d0 f9 BNE PVIEWG ;
665 14d6 a2 83 LDX #MAZE1L+1 ; left view, step 2
666 14d8 a0 80 LDY #MAZE0L ;
667 14da 20 e0 15 PVIEWH JSR PVIEW4 ; change bits to pointers
668 14dd c0 88 CPY #MAZE3L+2 ;
669 14df d0 f9 BNE PVIEWH ;
670 14e1
671 14e1 ad 82 02 LDA SWCHB ; check difficulty switch
672 14e4 29 40 AND #$40
673 14e6 f0 06 BEQ DOBALL
674 14e8 85 96 STA BALLTOP ; set top & bottom same
675 14ea 85 97 STA BALLBOT ; to prevent ball display
676 14ec d0 09 BNE NOBALL
677 14ee 20 b7 16 DOBALL JSR SKPOSXY ; add skeleton direction pointer
678 14f1 20 b2 15 JSR PDIRXY
679 14f4 20 fe 15 JSR POSBALL
680 14f7
681 14f7 a5 99 NOBALL LDA SKELDIS ; skeleton view
682 14f9 29 03 AND #$03 ; check distance
683 14fb d0 09 BNE SKPOSA
684 14fd 85 95 STA SKELBOT ; force skeleton off
685 14ff e9 01 SBC #1 ; by reversing top & bottom
686 1501 85 94 STA SKELTOP
687 1503 4c 94 15 JMP SKVIEW0
688 1506 38 SKPOSA SEC ; decrement for table access
689 1507 e9 01 SBC #1
690 1509 0a ASL ; multiply by 16
691 150a 0a ASL
692 150b 0a ASL
693 150c 0a ASL
694 150d a8 TAY
695 150e b9 00 1c LDA SKTABLE,Y ; use table to update RAM
696 1511 85 2b STA HMCLR
697 1513 85 20 STA HMP0
698 1515 b9 01 1c LDA SKTABLE+1,Y
699 1518 85 94 STA SKELTOP
700 151a b9 02 1c LDA SKTABLE+2,Y
701 151d 85 95 STA SKELBOT
702 151f b9 03 1c LDA SKTABLE+3,Y
703 1522 85 04 STA NUSIZ0
704 1524 85 05 STA NUSIZ1
705 1526 a5 ac LDA PLAYDIR ; figure out facing
706 1528 c5 af CMP SKELDIR
707 152a f0 21 BEQ SKPOSB ; same dir = back
708 152c c5 b0 CMP SKELRIG ; left
709 152e f0 2f BEQ SKPOSC
710 1530 18 CLC
711 1531 65 af ADC SKELDIR
712 1533 f0 42 BEQ SKPOSD ; inverse = front
713 1535 b9 08 1c LDA SKTABLE+8,Y ; must be right
714 1538 85 92 STA SKEL1 ; arm on the right
715 153a b9 09 1c LDA SKTABLE+9,Y
716 153d 85 93 STA SKEL1+1
717 153f b9 0a 1c LDA SKTABLE+10,Y ; body on the left
718 1542 85 90 STA SKEL0
719 1544 b9 0b 1c LDA SKTABLE+11,Y
720 1547 85 91 STA SKEL0+1
721 1549 a9 18 LDA #$18 ; mirror both
722 154b d0 3a BNE SKVIEW
723 154d b9 06 1c SKPOSB LDA SKTABLE+6,Y ; back for both
724 1550 85 90 STA SKEL0
725 1552 85 92 STA SKEL1
726 1554 b9 07 1c LDA SKTABLE+7,Y
727 1557 85 91 STA SKEL0+1
728 1559 85 93 STA SKEL1+1
729 155b a9 08 LDA #$08 ; left normal, right mirror
730 155d d0 28 BNE SKVIEW
731 155f b9 08 1c SKPOSC LDA SKTABLE+8,Y ; arm on the left
732 1562 85 90 STA SKEL0
733 1564 b9 09 1c LDA SKTABLE+9,Y
734 1567 85 91 STA SKEL0+1
735 1569 b9 0a 1c LDA SKTABLE+10,Y ; body on the right
736 156c 85 92 STA SKEL1
737 156e b9 0b 1c LDA SKTABLE+11,Y
738 1571 85 93 STA SKEL1+1
739 1573 a9 00 LDA #$00 ; no mirror
740 1575 f0 10 BEQ SKVIEW
741 1577 b9 04 1c SKPOSD LDA SKTABLE+4,Y ; front for both
742 157a 85 90 STA SKEL0
743 157c 85 92 STA SKEL1
744 157e b9 05 1c LDA SKTABLE+5,Y
745 1581 85 91 STA SKEL0+1
746 1583 85 93 STA SKEL1+1
747 1585 a9 08 LDA #$08 ; left normal, right mirror
748 1587 85 02 SKVIEW STA WSYNC ; hmove P0 for size
749 1589 85 2a STA HMOVE
750 158b 85 0c STA REFP1 ; set reflection registers
751 158d 4a LSR
752 158e 85 0b STA REFP0
753 1590 85 02 STA WSYNC
754 1592 85 2a STA HMOVE
755 1594
756 1594 20 b0 17 SKVIEW0 JSR WAITIM
757 1597
758 1597 a5 0c LDA INPT4 ; save button for debounce
759 1599 29 80 AND #$80
760 159b 85 9d STA THISFIR
761 159d a6 9c LDX FIREDEL ; decrement reload counter
762 159f f0 03 BEQ RELOAD
763 15a1 ca DEX
764 15a2 86 9c STX FIREDEL
765 15a4
766 15a4 ad 80 02 RELOAD LDA SWCHA ; save joystick for debounce
767 15a7 09 0f ORA #$0F
768 15a9 85 9f STA THISMOV
769 15ab
770 15ab a0 00 LDY #$00
771 15ad a2 00 LDX #$00
772 15af 4c 1b 10 JMP KERN0
773 15b2
774 15b2 ; 46
775 15b2 a9 01 PDIRXY LDA #$01 ; adjust SKELXY for PDIR
776 15b4 24 ac BIT PLAYDIR
777 15b6 f0 14 BEQ PDIRXY2 ; PLAYDIR = 16 or -16
778 15b8 30 05 BMI PDIRXY1 ; PLAYDIR = -1
779 15ba a6 a2 LDX SKELX ; PLAYDIR = 1
780 15bc a4 a3 LDY SKELY
781 15be 60 RTS
782 15bf a5 a2 PDIRXY1 LDA SKELX ; rotate 180
783 15c1 49 ff EOR #$FF ; NEG
784 15c3 aa TAX
785 15c4 e8 INX
786 15c5 a5 a3 LDA SKELY
787 15c7 49 ff EOR #$FF ; NEG
788 15c9 a8 TAY
789 15ca c8 INY
790 15cb 60 RTS
791 15cc 30 09 PDIRXY2 BMI PDIRXY3 ; PLAYDIR = -16
792 15ce a6 a3 LDX SKELY ; PLAYDIR = 16
793 15d0 a5 a2 LDA SKELX ; rotate 90
794 15d2 49 ff EOR #$FF ; NEG
795 15d4 a8 TAY
796 15d5 c8 INY
797 15d6 60 RTS
798 15d7 a5 a3 PDIRXY3 LDA SKELY ; rotate -90
799 15d9 49 ff EOR #$FF ; NEG
800 15db aa TAX
801 15dc e8 INX
802 15dd a4 a2 LDY SKELX
803 15df 60 RTS
804 15e0
805 15e0 ; 30
806 15e0 b5 00 PVIEW4 LDA $00,X ; right/left step 2 subroutine
807 15e2 f0 04 BEQ PVIEW5 ; open found, check next
808 15e4 a9 19 LDA #>TYPE0 ; closed, show wall
809 15e6 d0 0a BNE PVIEW7
810 15e8 b5 01 PVIEW5 LDA $01,X ; is next open too?
811 15ea f0 04 BEQ PVIEW6
812 15ec a9 1a LDA #>TYPE1 ; open, show hole
813 15ee d0 02 BNE PVIEW7
814 15f0 a9 1b PVIEW6 LDA #>TYPE2 ; both open, show Y
815 15f2 e8 PVIEW7 INX ; next test position
816 15f3 99 01 00 STA $0001,Y ; pointer MSB to RAM
817 15f6 a9 00 LDA #$00
818 15f8 99 00 00 STA $0000,Y ; LSB = 0
819 15fb c8 INY ; next pointer position
820 15fc c8 INY
821 15fd 60 RTS
822 15fe
823 15fe ; 59
824 15fe 8a POSBALL TXA ; SKELX/Y into BALLTOP/BOT & RESBL
825 15ff f0 06 BEQ PBALL1
826 1601 30 08 BMI PBALL2
827 1603 a9 03 LDA #3
828 1605 d0 06 BNE PBALL3
829 1607 a9 5a PBALL1 LDA #90
830 1609 d0 02 BNE PBALL3
831 160b a9 b2 PBALL2 LDA #178
832 160d 85 96 PBALL3 STA BALLTOP
833 160f 18 CLC
834 1610 69 09 ADC #9
835 1612 85 97 STA BALLBOT
836 1614 98 TYA
837 1615 f0 08 BEQ PBALL4
838 1617 10 0c BPL PBALL5
839 1619 a9 60 LDA #$60
840 161b a0 03 LDY #3
841 161d d0 0a BNE PBALL6
842 161f a9 40 PBALL4 LDA #$40
843 1621 a0 06 LDY #6
844 1623 d0 04 BNE PBALL6
845 1625 a9 20 PBALL5 LDA #$20
846 1627 a0 09 LDY #9
847 1629 84 02 PBALL6 STY WSYNC ; -0
848 162b 84 14 STY RESBL ; -3
849 162d 88 PBALL0 DEY ; +2
850 162e 84 14 STY RESBL ; +3
851 1630 d0 fb BNE PBALL0 ; +2/3
852 1632 85 02 STA WSYNC
853 1634 85 24 STA HMBL
854 1636 85 2a STA HMOVE
855 1638 60 RTS
856 1639
857 1639 ; 51
858 1639 20 b0 17 DOVSYNC JSR WAITIM
859 163c a9 02 LDA #$02
860 163e 85 00 STA VSYNC
861 1640 20 a4 17 JSR RAND ; cycle LFSR
862 1643 a9 31 LDA #$31 ; ball width = 8
863 1645 85 0a STA CTRLPF ; reflect playfield
864 1647 85 02 STA WSYNC ; set initial skeleton position
865 1649 a2 08 LDX #8 ;-2
866 164b ca SKPOS0 DEX ;+2
867 164c d0 fd BNE SKPOS0 ;+2/3
868 164e 85 10 STA RESP0 ;46-49
869 1650 a9 60 LDA #$60 ; shift left half left
870 1652 85 11 STA RESP1
871 1654 85 20 STA HMP0
872 1656 a9 40 LDA #$40 ; center right half (final position)
873 1658 85 21 STA HMP1
874 165a 85 02 STA WSYNC
875 165c 85 2a STA HMOVE
876 165e a9 2e LDA #38*76/64+1
877 1660 85 02 STA WSYNC
878 1662 8d 96 02 STA TIM64T
879 1665 a9 00 LDA #$00
880 1667 85 00 STA VSYNC
881 1669 85 2b STA HMCLR
882 166b 60 RTS
883 166c
884 166c ; 37
885 166c 85 02 XWALL0 STA WSYNC ;46-0
886 166e a9 00 LDA #0 ;-2
887 1670 c4 96 CPY BALLTOP ;-4
888 1672 90 06 BCC XWALL1 ;-6/7
889 1674 c4 97 CPY BALLBOT ;-8
890 1676 b0 02 BCS XWALL1 ;-10/11
891 1678 a9 02 LDA #2 ;-12
892 167a 85 1f XWALL1 STA ENABL ;-15
893 167c c4 94 XWALL CPY SKELTOP ;-17
894 167e 90 0c BCC XWALL2 ;-19/20
895 1680 c4 95 CPY SKELBOT ;-21
896 1682 b0 08 BCS XWALL2 ;-23/24
897 1684 b1 90 LDA (SKEL0),Y ;-28
898 1686 85 1b STA GRP0 ;-31
899 1688 b1 92 LDA (SKEL1),Y ;-36
900 168a 85 1c STA GRP1 ;-39
901 168c c8 XWALL2 INY ;-41
902 168d ca DEX ;-43
903 168e d0 dc BNE XWALL0 ;-45/46
904 1690 60 RTS ;-51
905 1691
906 1691 ; 38
907 1691 84 a3 SKSTEP STY SKELY
908 1693 8a TXA
909 1694 30 07 BMI SKSTEP1 ; skeleton behind
910 1696 49 ff EOR #$FF ; NEG
911 1698 18 CLC
912 1699 69 01 ADC #$01
913 169b 30 01 BMI SKSTEP2
914 169d 0a SKSTEP1 ASL ; multiply by 2
915 169e 85 a2 SKSTEP2 STA SKELX
916 16a0 98 TYA
917 16a1 10 09 BPL SKSTEP3 ; skeleton right
918 16a3 18 CLC
919 16a4 65 a2 ADC SKELX
920 16a6 aa TAX ; left = X + Y
921 16a7 18 CLC
922 16a8 65 a3 ADC SKELY
923 16aa a8 TAY ; right = X + 2Y
924 16ab 60 RTS
925 16ac a5 a2 SKSTEP3 LDA SKELX
926 16ae 38 SEC
927 16af e5 a3 SBC SKELY
928 16b1 a8 TAY ; right = X - Y
929 16b2 38 SEC
930 16b3 e5 a3 SBC SKELY
931 16b5 aa TAX ; left = X - 2Y
932 16b6 60 RTS
933 16b7
934 16b7 ; 36
935 16b7 a5 ae SKPOSXY LDA SKELPOS ; change SKPOS-PLAYPOS to SKELX+SKELY
936 16b9 38 SEC
937 16ba e5 ab SBC PLAYPOS
938 16bc 85 a2 STA SKELX
939 16be 4a LSR
940 16bf 4a LSR
941 16c0 4a LSR
942 16c1 4a LSR
943 16c2 24 b1 BIT TESTBIT ; negative?
944 16c4 f0 02 BEQ SKXY2
945 16c6 09 f0 ORA #$F0
946 16c8 85 a3 SKXY2 STA SKELY
947 16ca a5 a2 LDA SKELX
948 16cc 24 b1 BIT TESTBIT ; negative?
949 16ce f0 06 BEQ SKXY3
950 16d0 e6 a3 INC SKELY
951 16d2 09 f0 ORA #$F0
952 16d4 30 02 BMI SKXY4
953 16d6 29 0f SKXY3 AND #$0F
954 16d8 85 a2 SKXY4 STA SKELX
955 16da 60 RTS
956 16db
957 16db ; 36
958 16db 78 START SEI ; enable interupts
959 16dc d8 CLD ; turn off BCD math
960 16dd a9 00 LDA #$00 ; clear zero page memory & registers
961 16df a2 44 LDX #$44 ; start with the TIA shadow
962 16e1 95 00 NULL STA 0,X
963 16e3 e8 INX
964 16e4 d0 fb BNE NULL
965 16e6 86 a2 STX TITLEX ; <TITLEPF = 0
966 16e8 ca DEX ; set stack to bottom of RAM
967 16e9 9a TXS
968 16ea
969 16ea 86 08 STX COLUPF ; set up title screen
970 16ec a9 55 LDA #<GOT
971 16ee 85 99 STA TITLEND
972 16f0 a0 0b LDY #11
973 16f2 84 a3 STY TITLEY
974 16f4 a9 25 LDA #31*76/64+1
975 16f6 85 95 STA TITLBOT
976 16f8 a9 30 LDA #40*76/64+1
977 16fa 85 94 STA TITLTOP
978 16fc 4c ff 16 JMP TITLE3
979 16ff
980 16ff ; 110
981 16ff a9 02 TITLE3 LDA #$02
982 1701 85 00 STA VSYNC
983 1703 85 02 STA WSYNC
984 1705 20 a4 17 JSR RAND ; cycle LFSR
985 1708 85 02 STA WSYNC
986 170a a5 94 LDA TITLTOP
987 170c 85 02 STA WSYNC
988 170e 8d 96 02 STA TIM64T
989 1711 a9 00 LDA #$00
990 1713 85 00 STA VSYNC
991 1715 a6 a2 LDX TITLEX
992 1717 20 b0 17 TITLE2 JSR WAITIM
993 171a 85 02 TITLE STA WSYNC
994 171c bd 01 1f LDA TITLEPF+1,X ;-4
995 171f 85 0e STA PF1 ;-7
996 1721 bd 02 1f LDA TITLEPF+2,X ;-11
997 1724 85 0f STA PF2 ;-14
998 1726 bd 00 1f LDA TITLEPF,X ;-18
999 1729 85 0d STA PF0 ;-21
1000 172b 0a ASL ;-23
1001 172c 0a ASL ;-25
1002 172d 0a ASL ;-27
1003 172e 0a ASL ;-31
1004 172f 85 0d STA PF0 ;-34
1005 1731 bd 03 1f LDA TITLEPF+3,X ;-38
1006 1734 85 0e STA PF1 ;-41
1007 1736 bd 04 1f LDA TITLEPF+4,X ;-45
1008 1739 88 DEY ;-47
1009 173a d0 07 BNE TITLE0 ;-49/50
1010 173c a4 a3 LDY TITLEY ;-52
1011 173e e8 INX ;-54
1012 173f e8 INX ;-56
1013 1740 e8 INX ;-58
1014 1741 e8 INX ;-60
1015 1742 e8 INX ;-62
1016 1743 85 0f TITLE0 STA PF2 ;50/62-53/65
1017 1745 e4 99 CPX TITLEND ;-67
1018 1747 d0 d1 BNE TITLE ;-69/70
1019 1749 a5 95 LDA TITLBOT ;-72
1020 174b 85 02 STA WSYNC ;-0
1021 174d 8d 96 02 STA TIM64T ;-4
1022 1750 a9 00 LDA #0
1023 1752 85 0d STA PF0
1024 1754 85 0e STA PF1
1025 1756 85 0f STA PF2
1026 1758 85 19 STA AUDV0
1027 175a 85 1a STA AUDV1
1028 175c ad 82 02 LDA SWCHB ; check reset/select
1029 175f 29 03 AND #$03
1030 1761 c9 03 CMP #$03
1031 1763 f0 03 BEQ TITLE1
1032 1765 4c 97 17 JMP INIT
1033 1768 20 b0 17 TITLE1 JSR WAITIM
1034 176b f0 92 BEQ TITLE3
1035 176d
1036 176d ; 28
1037 176d a0 8c GOTYOU LDY #<WIN-5
1038 176f a2 55 LDX #<GOT
1039 1771 d0 04 BNE GOTYOU2
1040 1773 a0 aa YOUWIN LDY #<SKBODY3
1041 1775 a2 73 LDX #<YOU
1042 1777 84 99 GOTYOU2 STY TITLEND
1043 1779 86 a2 STX TITLEX
1044 177b a0 0f LDY #15
1045 177d 84 a3 STY TITLEY
1046 177f a9 32 LDA #42*76/64+1
1047 1781 85 95 STA TITLBOT
1048 1783 a9 3d LDA #51*76/64+1
1049 1785 85 94 STA TITLTOP
1050 1787 d0 df BNE TITLE1
1051 1789
1052 1789 ; 14
1053 1789 a8 PVIEW3 TAY ; right/left step 1 subroutine
1054 178a a5 b2 LDA LVLMASK ; move bits from ROM to RAM
1055 178c 39 00 18 AND MAZES,Y
1056 178f 95 00 STA $00,X
1057 1791 e8 INX
1058 1792 98 TYA
1059 1793 18 CLC ; move forward one step
1060 1794 65 ac ADC PLAYDIR
1061 1796 60 RTS
1062 1797
1063 1797 ; 13
1064 1797 a2 0e INIT LDX #LOADEND-LOADRAM
1065 1799 bd 2b 1c INITL LDA LOADRAM-1,X ; copy in initial values
1066 179c 95 a5 STA RAMLOAD-1,X
1067 179e ca DEX
1068 179f d0 f8 BNE INITL
1069 17a1 4c e9 11 JMP LAST
1070 17a4
1071 17a4 ; 12
1072 17a4 a5 9a RAND LDA RANDOM ; simple 8 bit LFSR
1073 17a6 f0 03 BEQ XSEED ;+5/6
1074 17a8 4a LSR ;+7
1075 17a9 90 02 BCC SRAND ;+9/10
1076 17ab 49 a9 XSEED EOR #$A9 ;+6/9-8/11
1077 17ad 85 9a SRAND STA RANDOM ;+8/10/11-11/14
1078 17af 60 RTS ;+17/20
1079 17b0
1080 17b0 ; 8
1081 17b0 85 02 WAITIM STA WSYNC ;-0
1082 17b2 ad 84 02 LDA INTIM ;-4
1083 17b5 d0 f9 BNE WAITIM ; wait for bottom of frame
1084 17b7 60 RTS
1085 17b8
------- FILE SKELDATA.ASM LEVEL 2 PASS 2
0 17b8 INCLUDE "SKELDATA.ASM"
1 1800 ORG $1800
2 1800 MAZES
3 1800 00 00 05 61* HEX 00 00 05 61 75 0B CA 51 93 01 1E 40 A8 61 C9 BA
4 1810 45 fa 1e 82* HEX 45 FA 1E 82 0D BD 62 24 1D E4 2A D3 9C 33 55 26
5 1820 41 c2 03 70* HEX 41 C2 03 70 42 05 31 8E 5C 77 20 74 50 21 89 81
6 1830 39 36 09 95* HEX 39 36 09 95 3A 8A 40 61 D4 50 88 53 CB 67 72 16
7 1840 44 84 6a 04* HEX 44 84 6A 04 45 E9 16 98 1A 23 05 37 43 58 90 29
8 1850 ca 31 d1 92* HEX CA 31 D1 92 7C 43 17 64 41 84 5C 92 0B A4 13 C5
9 1860 10 3f 7d 11* HEX 10 3F 7D 11 C0 42 AA 66 BB 02 21 60 76 60 AA 0E
10 1870 30 f4 01 87* HEX 30 F4 01 87 68 55 93 50 00 44 9F 08 C1 A8 35 40
11 1880 e9 e2 08 71* HEX E9 E2 08 71 E2 43 3D 54 FB 40 76 22 96 06 52 D8
12 1890 7f 03 16 d0* HEX 7F 03 16 D0 5C 81 09 82 45 81 08 83 6C 41 A9 74
13 18a0 46 80 68 41* HEX 46 80 68 41 3B B5 57 B2 2C B6 75 12 20 92 06 8B
14 18b0 41 b9 16 c7* HEX 41 B9 16 C7 07 50 1B 42 21 61 58 D0 4D 31 C8 30
15 18c0 14 4b 82 ba* HEX 14 4B 82 BA 01 F8 B6 4A 97 C9 46 71 C7 46 46 49
16 18d0 86 23 57 0c* HEX 86 23 57 0C 42 55 14 05 21 30 84 49 75 4C F1 30
17 18e0 40 38 94 24* HEX 40 38 94 24 F3 DC 7E D3 09 CE 11 23 83 4A 62 2D
18 18f0 c3 7c 97 48* HEX C3 7C 97 48 C2 00 35 31 3D 40 E0 6D 33 07 94 10
19 1900
20 1900 ORG $1900
21 1900 TYPE0 ; NO OPENING
22 1900 10 10 10 10* HEX 1010101010 ; MAZE0 PF0
23 1905 20 20 20 20* HEX 2020202020
24 190a 40 40 40 40* HEX 4040404040
25 190f 80 80 80 80* HEX 8080808080
26 1914 80 80 80 80* HEX 8080808080 ; MAZE1 PF1
27 1919 40 40 40 40* HEX 4040404040
28 191e 20 20 20 20* HEX 2020202020
29 1923 10 10 10 10* HEX 1010101010
30 1928 18 18 18 18* HEX 1818181818 ; MAZE2 PF1
31 192d 14 14 14 14* HEX 1414141414
32 1932 12 12 12 12* HEX 1212121212
33 1937 11 11 11 11* HEX 1111111111
34 193c 01 01 01 01* HEX 0101010101 ; MAZE3 PF2
35 1941 02 02 02 02* HEX 0202020202
36 1946 04 04 04 04* HEX 0404040404
37 194b 08 08 08 08* HEX 0808080808
38 1950
39 1950 00 00 00 00* DS 30
40 196e
41 196e f8 f8 f8 f8* HEX F8F8F8F8F8 ; MAZE3 PF2
42 1973 04 04 04 04* HEX 0404040404
43 1978 02 02 02 02* HEX 0202020202
44 197d 01 01 01 01* HEX 0101010101
45 1982 11 11 11 11* HEX 1111111111 ; MAZE2 PF1
46 1987 12 12 12 12* HEX 1212121212
47 198c 14 14 14 14* HEX 1414141414
48 1991 18 18 18 18* HEX 1818181818
49 1996 1f 1f 1f 1f* HEX 1F1F1F1F1F ; MAZE1 PF1
50 199b 20 20 20 20* HEX 2020202020
51 19a0 40 40 40 40* HEX 4040404040
52 19a5 80 80 80 80* HEX 8080808080
53 19aa 80 80 80 80* HEX 8080808080 ; MAZE0 PF0
54 19af 40 40 40 40* HEX 4040404040
55 19b4 20 20 20 20* HEX 2020202020
56 19b9 10 10 10 10* HEX 1010101010
57 19be
58 19be 03 03 07 07*SKFRON2 HEX 03 03 07 07 05 05 06 06 03 03 02 02 01 01 3F 3F
59 19ce 41 41 4f 4f* HEX 41 41 4F 4F 41 41 4F 4F 41 41 2F 2F 21 21 27 27
60 19de 53 53 51 51* HEX 53 53 51 51 02 02 02 02 02 02 02 02 02 02 02 02
61 19ee 04 04 02 02* HEX 04 04 02 02 02 02 02 02 02 02 02 02 1E 1E 00
62 19fd
63 1a00 ORG $1A00
64 1a00 TYPE1 ; OPENING
65 1a00 00 00 00 00* HEX 0000000000 ; MAZE0 PF0
66 1a05 00 00 00 00* HEX 0000000000
67 1a0a 00 00 00 00* HEX 0000000000
68 1a0f f0 f0 f0 f0* HEX F0F0F0F0F0
69 1a14 00 00 00 00* HEX 0000000000 ; MAZE1 PF1
70 1a19 00 00 00 00* HEX 0000000000
71 1a1e 00 00 00 00* HEX 0000000000
72 1a23 f0 f0 f0 f0* HEX F0F0F0F0F0
73 1a28 10 10 10 10* HEX 1010101010 ; MAZE2 PF1
74 1a2d 10 10 10 10* HEX 1010101010
75 1a32 10 10 10 10* HEX 1010101010
76 1a37 1f 1f 1f 1f* HEX 1F1F1F1F1F
77 1a3c 00 00 00 00* HEX 0000000000 ; MAZE3 PF2
78 1a41 00 00 00 00* HEX 0000000000
79 1a46 00 00 00 00* HEX 0000000000
80 1a4b 0f 0f 0f 0f* HEX 0F0F0F0F0F
81 1a50
82 1a50 00 00 00 00* DS 30
83 1a6e
84 1a6e ff ff ff ff* HEX FFFFFFFFFF ; MAZE3 PF2
85 1a73 04 04 04 04* HEX 0404040404
86 1a78 02 02 02 02* HEX 0202020202
87 1a7d 01 01 01 01* HEX 0101010101
88 1a82 1f 1f 1f 1f* HEX 1F1F1F1F1F ; MAZE2 PF1
89 1a87 12 12 12 12* HEX 1212121212
90 1a8c 14 14 14 14* HEX 1414141414
91 1a91 18 18 18 18* HEX 1818181818
92 1a96 ff ff ff ff* HEX FFFFFFFFFF ; MAZE1 PF1
93 1a9b 20 20 20 20* HEX 2020202020
94 1aa0 40 40 40 40* HEX 4040404040
95 1aa5 80 80 80 80* HEX 8080808080
96 1aaa f0 f0 f0 f0* HEX F0F0F0F0F0 ; MAZE0 PF0
97 1aaf 40 40 40 40* HEX 4040404040
98 1ab4 20 20 20 20* HEX 2020202020
99 1ab9 10 10 10 10* HEX 1010101010
100 1abe
101 1abe 03 03 07 07*SKBACK2 HEX 03 03 07 07 07 07 07 07 03 03 03 03 01 01 3F 3F
102 1ace 5f 5f 4f 4f* HEX 5F 5F 4F 4F 41 41 4F 4F 41 41 2F 2F 21 21 27 27
103 1ade 53 53 51 51* HEX 53 53 51 51 02 02 02 02 02 02 02 02 02 02 02 02
104 1aee 04 04 02 02* HEX 04 04 02 02 02 02 02 02 02 02 02 02 1E 1E 00
105 1afd
106 1b00 ORG $1B00
107 1b00 TYPE2 ; CORRIDOR
108 1b00 00 00 00 00* HEX 0000000000 ; MAZE0 PF0
109 1b05 00 00 00 00* HEX 0000000000
110 1b0a 00 00 00 00* HEX 0000000000
111 1b0f 80 80 80 80* HEX 8080808080
112 1b14 00 00 00 00* HEX 0000000000 ; MAZE1 PF1
113 1b19 00 00 00 00* HEX 0000000000
114 1b1e 00 00 00 00* HEX 0000000000
115 1b23 10 10 10 10* HEX 1010101010
116 1b28 10 10 10 10* HEX 1010101010 ; MAZE2 PF1
117 1b2d 10 10 10 10* HEX 1010101010
118 1b32 10 10 10 10* HEX 1010101010
119 1b37 11 11 11 11* HEX 1111111111
120 1b3c 00 00 00 00* HEX 0000000000 ; MAZE3 PF2
121 1b41 00 00 00 00* HEX 0000000000
122 1b46 00 00 00 00* HEX 0000000000
123 1b4b 08 08 08 08* HEX 0808080808
124 1b50
125 1b50 00 00 00 00* DS 30
126 1b6e
127 1b6e ff ff ff ff* HEX FFFFFFFFFF ; MAZE3 PF2
128 1b73 04 04 04 04* HEX 0404040404
129 1b78 02 02 02 02* HEX 0202020202
130 1b7d 01 01 01 01* HEX 0101010101
131 1b82 1f 1f 1f 1f* HEX 1F1F1F1F1F ; MAZE2 PF1
132 1b87 12 12 12 12* HEX 1212121212
133 1b8c 14 14 14 14* HEX 1414141414
134 1b91 18 18 18 18* HEX 1818181818
135 1b96 ff ff ff ff* HEX FFFFFFFFFF ; MAZE1 PF1
136 1b9b 20 20 20 20* HEX 2020202020
137 1ba0 40 40 40 40* HEX 4040404040
138 1ba5 80 80 80 80* HEX 8080808080
139 1baa f0 f0 f0 f0* HEX F0F0F0F0F0 ; MAZE0 PF0
140 1baf 40 40 40 40* HEX 4040404040
141 1bb4 20 20 20 20* HEX 2020202020
142 1bb9 10 10 10 10* HEX 1010101010
143 1bbe
144 1bbe 70 70 f8 f8*SKBODY2 HEX 70 70 F8 F8 B8 B8 F8 F8 78 78 D0 D0 10 10 78 78
145 1bce f8 f8 f8 f8* HEX F8 F8 F8 F8 08 08 F8 F8 08 08 38 38 08 08 38 38
146 1bde 38 38 38 38* HEX 38 38 38 38 10 10 10 10 10 10 10 10 10 10 10 10
147 1bee 20 20 10 10* HEX 20 20 10 10 10 10 10 10 10 10 10 10 70 70 00
148 1bfd
149 1c00 ORG $1C00
150 1c00 70 43 a1 07 SKTABLE DC.B $70, 67, 161, $07
151 1c04 00 1c 5e 1c* DC.W SKFRON1-67, SKBACK1-67, SKARM1-67, SKBODY1-67
152 1c0c 45 72 69 63 DC.B $45, $72, $69, $63
153 1c10 f0 4f 8e 05 DC.B $F0, 79, 142, $05
154 1c14 6f 19 6f 1a* DC.W SKFRON2-79, SKBACK2-79, SKARM2-79, SKBODY2-79
155 1c1c 42 61 6c 6c DC.B $42, $61, $6C, $6C
156 1c20 b0 59 79 00 DC.B $B0, 89, 121, $00
157 1c24 55 1d 75 1d* DC.W SKFRON3-89, SKBACK3-89, SKARM3-89, SKBODY3-89
158 1c2c
159 1c2c 3c LOADRAM DC.B 60 ; SKELDEL
160 1c2d 3c DC.B 60 ; SKELPER
161 1c2e 1e DC.B 30 ; SKELSEC
162 1c2f 2c DC.B 44 ; SKELMIN
163 1c30 2b DC.B 43 ; SKELHRS
164 1c30 1c 31 LOADDEL EQU .
165 1c31 00 DC.B $00 ; PLAYPOS
166 1c32 01 DC.B 1 ; PLAYDIR
167 1c33 10 DC.B 16 ; PLAYRIG
168 1c34 88 DC.B $88 ; SKELPOS
169 1c35 01 DC.B 1 ; SKELDIR
170 1c36 10 DC.B 16 ; SKELRIG
171 1c36 1c 37 LOADLVL EQU .
172 1c37 08 DC.B $08 ; TESTBIT
173 1c38 01 DC.B 1 ; LVLMASK
174 1c39 13 DC.B $13 ; MAZECOL
175 1c39 1c 3a LOADEND EQU .
176 1c3a
177 1c43 ORG $1C00+67
178 1c43 03 03 03 07*SKFRON1 HEX 03 03 03 07 07 07 05 05 05 06 06 06 03 03 03 02
179 1c53 02 02 01 01* HEX 02 02 01 01 01 3F 3F 3F 41 41 41 4F 4F 4F 41 41
180 1c63 41 4f 4f 4f* HEX 41 4F 4F 4F 41 41 41 2F 2F 2F 21 21 21 27 27 27
181 1c73 53 53 53 51* HEX 53 53 53 51 51 51 02 02 02 02 02 02 02 02 02 02
182 1c83 02 02 02 02* HEX 02 02 02 02 02 02 02 02 04 04 04 02 02 02 02 02
183 1c93 02 02 02 02* HEX 02 02 02 02 02 02 02 02 02 02 1E 1E 1E 00
184 1ca1
185 1ca1 03 03 03 07*SKBACK1 HEX 03 03 03 07 07 07 07 07 07 07 07 07 03 03 03 03
186 1cb1 03 03 01 01* HEX 03 03 01 01 01 3F 3F 3F 5F 5F 5F 4F 4F 4F 41 41
187 1cc1 41 4f 4f 4f* HEX 41 4F 4F 4F 41 41 41 2F 2F 2F 21 21 21 27 27 27
188 1cd1 53 53 53 51* HEX 53 53 53 51 51 51 02 02 02 02 02 02 02 02 02 02
189 1ce1 02 02 02 02* HEX 02 02 02 02 02 02 02 02 04 04 04 02 02 02 02 02
190 1cf1 02 02 02 02* HEX 02 02 02 02 02 02 02 02 02 02 1E 1E 1E 00
191 1cff
192 1d00 ORG $1D00
193 1d00 02 02 02 02*LIFELUM DC.B 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4
194 1d10 04 04 04 04* DC.B 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6
195 1d20 06 06 06 08* DC.B 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10
196 1d30 0a 0a 0a 0a* DC.B 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12
197 1d40 0c 0c 0c 0c* DC.B 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14
198 1d50
199 1d50 70 70 70 f8*SKBODY1 HEX 70 70 70 F8 F8 F8 B8 B8 B8 F8 F8 F8 78 78 78 D0
200 1d60 d0 d0 10 10* HEX D0 D0 10 10 10 78 78 78 F8 F8 F8 F8 F8 F8 08 08
201 1d70 08 f8 f8 f8* HEX 08 F8 F8 F8 08 08 08 38 38 38 08 08 08 38 38 38
202 1d80 38 38 38 38* HEX 38 38 38 38 38 38 10 10 10 10 10 10 10 10 10 10
203 1d90 10 10 10 10* HEX 10 10 10 10 10 10 10 10 20 20 20 10 10 10 10 10
204 1da0 10 10 10 10* HEX 10 10 10 10 10 10 10 10 10 10 70 70 70 00
205 1dae
206 1dae 03 07 05 06*SKFRON3 HEX 03 07 05 06 03 02 01 3F 41 4F 41 4F 41 2F 21 27
207 1dbe 53 51 02 02* HEX 53 51 02 02 02 02 02 02 04 02 02 02 02 02 1E 00
208 1dce
209 1dce 03 07 07 07*SKBACK3 HEX 03 07 07 07 03 03 01 3F 5F 4F 41 4F 41 2F 21 27
210 1dde 53 51 02 02* HEX 53 51 02 02 02 02 02 02 04 02 02 02 02 02 1E 00
211 1dee
212 1e00 ORG $1E00
213 1e00
214 1e00 00 10 20 30*SKELDIE HEX 00 10 20 30 41 51 61 71 82 92 A2 B2 C3 D3 E3 F3
215 1e10 14 24 34 44* HEX 14 24 34 44 55 65 75 85 96 A6 B6 C6 D7 E7 F7 17
216 1e20 28 38 48 58* HEX 28 38 48 58 69 79 89 99 AA BA CA DA EB FB 1B 2B
217 1e30 3c 4c 5c 6c* HEX 3C 4C 5C 6C 7D 8D 9D AD BE CE DE EE FF
218 1e3d
219 1e43 ORG $1E00+67
220 1e43 00 00 00 00*SKARM1 HEX 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
221 1e53 00 00 00 00* HEX 00 00 00 00 00 00 00 00 3F 3F 3F 00 00 00 00 00
222 1e63 00 00 00 00* HEX 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
223 1e73 00 00 00 00* HEX 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
224 1e83 00 00 00 00* HEX 00 00 00 00 00 00 00 00 00 00 00 00 00 00
225 1e91 00 00 00 00*SKARM2 HEX 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
226 1ea1 3f 3f 00 00* HEX 3F 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00
227 1eb1 00 00 00 00* HEX 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
228 1ec1 00 00 00 00* HEX 00 00 00 00 00 00 00
229 1ec8 00 00 00 00*SKARM3 HEX 00 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00
230 1ed8 00 00 00 00* HEX 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
231 1ee8
232 1f00 ORG $1F00
233 1f00 ff 4b 0b 7d*TITLEPF HEX FF4B0B7D89 ; SKELETON
234 1f05 11 52 08 12* HEX 115208129A
235 1f0a f7 63 09 12* HEX F7630912AA
236 1f0f 81 52 08 12* HEX 81520812CA
237 1f14 ff 4b 7b 11* HEX FF4B7B1189
238 1f19 00 00 00 00* HEX 0000000000
239 1f1e 01 00 38 80* HEX 0100388000 ; BY
240 1f23 01 00 48 80* HEX 0100488000
241 1f28 0a 00 38 00* HEX 0A00380000
242 1f2d 04 00 48 00* HEX 0400480000
243 1f32 04 00 38 00* HEX 0400380000
244 1f37 00 00 00 00* HEX 0000000000
245 1f3c fe 73 39 19* HEX FE73391910 ; ERIC BALL
246 1f41 12 49 04 a5* HEX 124904A510
247 1f46 7e 71 04 3d* HEX 7E71043D10
248 1f4b 12 49 04 a5* HEX 124904A510
249 1f50 fe 4b 39 25* HEX FE4B3925F7
250 1f55
251 1f55 ff ff f8 ff*GOT HEX FF FF F8 FF F8
252 1f5a 30 00 cc 60* HEX 30 00 CC 60 CC
253 1f5f 30 3f 78 60* HEX 30 3F 78 60 78
254 1f64 30 03 e0 60* HEX 30 03 E0 60 E0
255 1f69 f0 ff e0 60* HEX F0 FF E0 60 E0
256 1f6e 00 00 00 00* HEX 00 00 00 00 00
257 1f73 33 03 fc 03*YOU HEX 33 03 FC 03 FC
258 1f78 33 03 0c 03* HEX 33 03 0C 03 0C
259 1f7d f3 ff 0c 03* HEX F3 FF 0C 03 0C
260 1f82 03 60 0c 03* HEX 03 60 0C 03 0C
261 1f87 0f 60 fc ff* HEX 0F 60 FC FF FC
262 1f8c 00 00 00 00* HEX 00 00 00 00 00
263 1f91 33 03 fc 07*WIN HEX 33 03 FC 07 FC
264 1f96 33 63 80 1b* HEX 33 63 80 1B 80
265 1f9b b3 9b 80 63* HEX B3 9B 80 63 80
266 1fa0 7b 07 80 83* HEX 7B 07 80 83 80
267 1fa5 37 03 fc 03* HEX 37 03 FC 03 FC
268 1faa
269 1faa 70 f8 b8 f8*SKBODY3 HEX 70 F8 B8 F8 78 D0 10 78 F8 F8 08 F8 08 38 08 38
270 1fba 38 38 10 10* HEX 38 38 10 10 10 10 10 10 20 10 10 10 10 10 70 00
271 1fca
------- FILE skeleton.asm
1087 1fca
1088 1ff8 ORG $1FF8 ; SuperCharger Bankswitch
1089 1ff8 31 53 4c 31 DC.B "1SL1"
1090 1ffc
1091 1ffc ORG $1FFC ; end of 4K cart
1092 1ffc db 16 DC.W START ; reset vector
1093 1ffe db 16 DC.W START ; IRQ vector